package com.kkk.shop.back.controller;

import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.kkk.shop.common.controller.BaseController;
import com.kkk.shop.common.util.ConstantFinalUtil;
import com.kkk.shop.common.util.PageInfoUtil;
import com.kkk.shop.user.pojo.AAdmins;
import com.kkk.shop.user.service.IUserService;

/**
 * SpringMvc中所有顶过注解Controller的类在tomcat启动时都会在log中显示
 * @author kkk
 * */
@Controller
public class NoLoginController extends BaseController
{
	@Resource
	private IUserService userService;
	
	//展示管理员列表
	@RequestMapping("/adminList")
	public String adminList(HttpServletRequest request)
	{
		ConstantFinalUtil.loggerMsg.info("------adminList-------");
		Map<String, Object> paramMap = ConstantFinalUtil.getParamMap();
		paramMap.put("keywords", "2");
		/* 分页 */
		PageInfoUtil pageInfoUtil = new PageInfoUtil();
		/*List<Aadmins> adminsList = this.userService.queryMultiObjService(pageInfoUtil, paramMap);*/
		List<AAdmins> adminList = this.userService.queryMultiAdminsService(null, paramMap);
		if(adminList!=null)
		{
			request.setAttribute("adminList", adminList);
		}
		return "/back/adminList";
	}
}
